package com.ghoul.generator.engine;


import com.ghoul.common.util.ToolUtil;
import com.ghoul.generator.engine.base.GhoulTemplateEngine;


/**
 * 通用的模板生成引擎
 */
public class SimpleTemplateEngine extends GhoulTemplateEngine {

    @Override
    protected void generateController() {
        String controllerPath = ToolUtil.format(super.getContextConfig().getProjectPath() + super.getControllerConfig().getControllerPathTemplate(),
                ToolUtil.firstLetterToUpper(super.getContextConfig().getBizEnName()));
        System.out.println(controllerPath);
        generateFile(super.getContextConfig().getTemplatePrefixPath() + "/Controller.java.btl", controllerPath);
        System.out.println("生成控制器成功!");
    }


}
